<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title></title>
	<style>
		body{
			font-size:9pt;	
		}
			
		#panel{
			width:600px;
			height:400px;
			border:1px solid #999;
			position:relative;
		}
		
			
		#img_1{
			position:absolute;
			left:236px;
			top:136px;		
		}
		
		#nav{
			text-align:center;
			width:600px;
		}
		
	</style>
	<script>
		
		window.onload=function(){
			this.initEventListener();
		}
		
		function initEventListener(){
			document.getElementById("btn_start").addEventListener("click",function(){
				alert("시작");
			},false);
			
			document.getElementById("btn_stop").addEventListener("click",function(){
				alert("멈춤");
			},false);			
		}		
	</script>
</head>

<body>	
	<div> 
		<h4>#img1을 #panel영역내에서 움직이도록 하기. 외각에 부딛치는 경우 팅겨져야 됨.</h4>
		<div id="panel"> 	
			<div id="img_1">
				<img src="fish.png">
			</div>
		</div>
		<div id="nav">
			<button id="btn_start">시작</button>
			<button id="btn_stop">멈춤</button>
		</div>
	</div>       
</body>
</html>
